﻿using ExpressesClass.BestApi.Utils;
using ExpressesClass.StoApi.Base;
using ExpressesClass.StoApi.billApply.response;
using ExpressesClass.StoApi.Util;

namespace ExpressesClass.StoApi.billApply.request
{
    public class BillApplyReq : StoRequest
    {
        public BillApplyReq()
        {
            this.orderNo = "";
            this.orderSource = "";
            this.billType = "";
            this.orderType = "";
            this.sender = new Person();
            this.receiver = new Person();
            this.cargo = new CargoDO();
            this.customer = new CustomerDO();
            this.internationalAnnex = new InternationalAnnexDO();
            this.waybillNo = "";
            this.codValue = "";
            this.freightCollectValue = "";
            this.timelessType = "";
            this.productType = "";
            this.remark = "";
            this.expressDirection = "";
            this.createChannel = "";
            this.regionType = "";
            this.insuredAnnex = new InsuredAnnexDo();
            this.expectValue = "";
            this.payModel = "";
        }

        public string orderNo { get; set; }
        public string orderSource { get; set; }
        public string billType { get; set; }
        public string orderType { get; set; }
        public Person sender { get; set; }
        public Person receiver { get; set; }
        public CargoDO cargo { get; set; }
        public CustomerDO customer { get; set; }
        public InternationalAnnexDO internationalAnnex { get; set; }
        public string waybillNo { get; set; }
        public string codValue { get; set; }
        public string freightCollectValue { get; set; }
        public string timelessType { get; set; }
        public string productType { get; set; }
        public string remark { get; set; }
        public string expressDirection { get; set; }
        public string createChannel { get; set; }
        public string regionType { get; set; }
        public InsuredAnnexDo insuredAnnex { get; set; }
        public string expectValue { get; set; }
        public string payModel { get; set; }

        public override string GetApiName()
        {
            return ConfigUrl.GetApiName("CREATE");
        }

        public override string GetKeyName()
        {
            return ConfigUrl.GetKeyName("CREATE");
        }

        public override string GetUrl()
        {
            return ConfigUrl.GetUrl("CREATE");
        }

        public override StoResponse makeResponse(string rsp)
        {
            return JsonParser.jsonToObj<BillApplyRsp>(rsp);
        }
    }
}
